﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<MM.Web.Models.MovieViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Crear
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Crear</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Campos</legend>
            
            <div class="editor-label">
                <%= this.Label(m => m.Nombre) %>
            </div>
            <div class="editor-field">
                <%= this.TextBox(m => m.Nombre) %>
                <%= this.ValidationMessage(m => m.Nombre, "*" ) %>
            </div>
            
            <div class="editor-label">
                <%= this.Label (m => m.Categorias).Title("Categoria") %>
            </div>
            <div class="editor-field">
                <%= this.Select(m => m.IdCategoria).Options(Model.Categorias, m => m.Id, m => m.Nombre)%>
                <%= this.ValidationMessage(m => m.Categorias,"*")%>
            </div>
            
            <div class="editor-label">
                <%= this.Label(m => m.Sinopsys) %>
            </div>
            <div class="editor-field">
                <%= this.TextArea(m => m.Sinopsys) %>
                <%= this.ValidationMessage(m => m.Sinopsys, "*") %>
            </div>
            
            <div class="editor-label">
                <%= this.Label(m => m.Fecha) %>
            </div>
            <div class="editor-field">
                <%= this.TextBox(m => m.Fecha).Format("{0:g}").Value("01/01/1900")%>
                <%= this.ValidationMessage(m => m.Fecha, "*")%>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Regresar", "Index") %>
    </div>

</asp:Content>

